﻿<UserControl x:Class="DashboardModule.Views.TempReportsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Width="900"
             Height="600">

    <Grid VerticalAlignment="Top" HorizontalAlignment="Left" Margin="25">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <Grid Name="itemsGrid" Grid.Column="0" Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="150" />
                <RowDefinition Height="125" />
                <RowDefinition Height="150" />
            </Grid.RowDefinitions>

            <!-- Going to change this up -->
            <!-- User List List -->
            <Border Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="25">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Border Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                        <TextBlock Text="Select User:"/>
                    </Border>

                    <Border Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <ComboBox Name="userComboBox" 
                              ItemsSource="{Binding Users}" 
                              Width="200"  
                              DisplayMemberPath="FullName"
                              SelectedValue="{Binding Path=SelectedUserGuid, Mode=TwoWay}"
                              SelectedValuePath="UserGuid">
                            <!--<ComboBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=FullName}" />
                            </DataTemplate>
                        </ComboBox.ItemTemplate>-->
                        </ComboBox>
                    </Border>
                </Grid>
            </Border>

            <!-- Weekly Report -->
            <Border Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <TextBlock Text="Weekly Activity" FontSize="18" />
                    </Border>

                    <!-- Start Date -->
                    <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                        <TextBlock Text="Start Date:" />
                    </Border>

                    <Border Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <DatePicker Name="startDateTextBlock" Width="125" Height="25" Text="{Binding Path=StartDate}" />
                    </Border>

                    <!-- End Date -->
                    <Border Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                        <TextBlock Text="End Date:" />
                    </Border>

                    <Border Grid.Column="3" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <DatePicker Name="endDateTextBlock" Width="125" Height="25" Text="{Binding Path=EndDate}" />
                    </Border>


                    <!-- Button -->
                    <Border Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,25,0" >
                        <Button Name="weeklyReportButton" Content="Run Weekly" Width="125" Height="25" Click="weeklyReportButton_Click" />
                    </Border>
                </Grid>
            </Border>

            <!-- Project Summary -->
            <Border Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="0,15">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <TextBlock Text="Project Summary" FontSize="18" />
                    </Border>

                    <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5" Width="300">
                        <Button Name="projectSummaryButton" Content="Run Summary" Width="125" Height="25" Click="projectSummaryButton_Click" />
                    </Border>
                </Grid>
            </Border>

            <!-- Individual Project Report -->
            <Border Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <TextBlock Text="Project Report" FontSize="18" />
                    </Border>

                    <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                        <TextBlock Text="Select Project:" />
                    </Border>

                    <Border Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                        <ComboBox Name="projectsComboBox" ItemsSource="{Binding FilteredProjects}" 
                              Width="300" Height="25"  
                              DisplayMemberPath="Name"
                              SelectedValuePath="ProjectGuid"
                              SelectedValue="{Binding Path=SelectedProjectGuid}">
                        </ComboBox>
                    </Border>

                    <Border Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,25,0">
                        <Button Name="projectReport" Content="Run" Width="125" Height="25"  Click="projectReport_Click" />
                    </Border>


                </Grid>
            </Border>
        </Grid>


        <!-- Progress Ring -->
        <Border Name="progressBorder" Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" Panel.ZIndex="3">
            <controls:ProgressRing Name="progressRing" />
        </Border>
    </Grid>
</UserControl>
